MACHINE_NAME=$1
VERSION=$2
INSTALL_PATH=$3

DEPLOYER=`id -u -n`
APP=${INSTALL_PATH//\/opt\/APP\//}
MESSAGE="(${APP}) ${VERSION} deployed to ${MACHINE_NAME^^} by ${DEPLOYER}"
wget --timeout=15 --no-proxy -O- --post-data="{\"messages\":[\"${MESSAGE}\"], \"duration\":5000}" --header=Content-Type:application/json "http://localhost:8765/broadcast"
